<h1>Listing sections</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Chapter</th>
  </tr>

<% for section in @sections %>
  <tr>
    <td><%=h section.title %></td>
    <td><%=h section.chapter_id %></td>
    <td><%= link_to 'Show', book_chapter_section_path(@book, @chapter, section) %></td>
    <td><%= link_to 'Edit', edit_book_chapter_section_path(@book, @chapter, section) %></td>
    <td><%= link_to 'Destroy', book_chapter_section_path(@book, @chapter, section), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New section', new_book_chapter_section_path(@book, @chapter) %>
